﻿@model IEnumerable<asMeishi.web.Models.comment>
@using asMeishi.web.Models;
@using publicLibrary;
@{
    Layout = null;
}
@foreach (var item in Model)
{    
    <li id="@item.Id.ToString()" title="@item.userName" class="comment">
        
          
          @*<span class="datetime _var">@item.datetime</span>*@
@*        <span class="author"><a href="#@item.userId" class="_var">@item.userName</a></span>*@
@*        <div class="avatar"><img src="/Content/images/userNullPic.png" /></div>*@
        
            <div>
            @if (item.content != null && item.content != "")
            {
                <span class="gray">评价: [ <a class="shopLink" href="/shop/detail/@item.targetId.ToString()" >@item.shopName()</a> ]</span>
                <div>
                <span class="content _var">@item.content.Substring(0, item.content.Length > 30 ? 30 : item.content.Length)</span>
                </div>
            }
            else
            {
                if (!string.IsNullOrWhiteSpace(@item.quality.ToTryString()))
                {
                    
                    
                    <span class="gray">打分: [ <a class="shopLink" href="/shop/detail/@item.targetId.ToString()" >@item.shopName()</a> ]</span>
                    <div class="grads"><span>味道</span><span class="quality _var">@item.quality</span>
                        <span>服务</span><span class="service _var">@item.service</span>
                        <span>环境</span><span class="priceQuality _var">@item.priceQuality</span>
                        @if (!string.IsNullOrWhiteSpace(@item.cost.ToTryString()))
                        {
                            <span><span>人均花费 : </span><span class="_var">@item.cost</span></span>
                        }
                    </div>
                
                    
                }
                else
                {
                    <span class="gray">菜肴: [ <a class="shopLink" href="/shop/detail/@item.targetId.ToString()" >@item.shopName()</a> ]</span>
                    <div class="item">@item.food.SplitToHTMLbyCode("<A href='_var_'>_var_</A>")</div>
                }
            }
            </div>
            <div style=" padding-left:30px; text-align:right">
@*            <span class="author" style=" margin-right:20px;"><a href="#@item.userId" class="_var" style=" font-size:12px;">@@@item.userName</a></span>*@
            
            </div>

    </li>
@*    <li><span class="content">@item.content</span>[ <a href="/shop/detail/@item.targetId.ToString()">@item.shopName()</a> ]</li>*@
}